#if !defined(ximera_graphics_iworld_hpp)
#define ximera_graphics_iworld_hpp

// -----------------------------------------------------------

#include <ximera/enum.hpp>
#include <ximera/common/sharedptr.hpp>
#include <ximera/graphics/iscenenode.hpp>
#include <ximera/graphics/iviewport.hpp>
#include <ximera/graphics/ientity.hpp>
#include <ximera/graphics/ilight.hpp>
#include <ximera/graphics/icamera.hpp>
#include <ximera/graphics/iparticlesystem.hpp>

namespace ximera { namespace graphics
{
    XIMERA_ENUM(PrefabEntityType)
        Plane,
        Cube,
        Sphere
    XIMERA_ENUM_END(PrefabEntityType)

    class XIMERA_API IWorld
    {
    public:
        virtual ~IWorld();

        virtual SharedPtr<ISceneNode> const& rootNode() = 0;

        virtual void loadFromFile(String const& file) = 0;

        virtual ILight* createLight(String const& name) = 0;        
        virtual ICamera* createCamera(String const& name) = 0;
        virtual IViewport* createViewport(ICamera* camera) = 0;
        virtual IEntity* createEntity(String const& name, PrefabEntityType type) = 0;
        virtual IEntity* createEntity(String const& name, String const& meshName) = 0;
        virtual IParticleSystem* createParticleSystem(String const& name, String const& templateName) = 0;
    };

    typedef SharedPtr<IWorld> IWorldPtr;
}}

// -----------------------------------------------------------

#endif
